"""
拷贝：
    浅拷贝：只是拷贝了地址。没有拷贝真正的数据。
        相当于共享

    深拷贝：将变量的数据，全部拷贝

copy模块：
    深拷贝的功能：
"""
import copy

a = [10, 20, 30]
print(a)
b = a  # 拷贝：？
print(b)

a[0] = 100
print(a)
print(b)

print("-" * 50)
c = [10, 20, 30]
d = []
for i in c:
    d.append(i)

print(c)
print(d)
c[0] = 100
print(c)
print(d)

e = copy.deepcopy(c)
f = copy.copy(c)
print('e:', 'copy.deepcopy(c) ')
print(e)
c[0] = 1000
print('c')
print(c)
print('e:')
print(e)
print('f:')
print(f)

# print("-" * 50)
# f = [10, 20, 30]
# g = [1, 2, 3]
# h = [f, g]
# print(h)
#
# j = copy.deepcopy(h)
# print(j)
#
# f[0] = 1000
# print(h)
# print(j)
